import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/vue-element-admin/user/login',
    method: 'post',
    data
  })
}
//登录
export function logOn(data) {

  return request({
    url: '/sudo_login_api',
    method: 'get',
    params: data
  })
}

export function getInfo(token) {
  return request({
    url: '/count_page_api',
    method: 'get',
    // params: { token }
  })
}
//注册
export function getRegister(data) {
  console.log(data, 'data')
  return request({
    url: '/sudo_register_api',
    method: 'post',
    params: data
  })
}

export function logout() {
  return request({
    url: '/vue-element-admin/user/logout',
    method: 'post'
  })
}
